package com.jyhz.common.dto;

import com.jyhz.common.util.HttpStatusCode;
import com.jyhz.common.util.TimeUtils;

import java.io.Serializable;

/**
 * @author:谢君臣
 * @Date:2021/6/12-19:19
 * @version:1.0
 * @function:
 */
public class HttpResult implements Serializable {
    public int code;
    public String msg;
    public Object data;
    public String time;

    public HttpResult() {
    }

    public HttpResult(int code, String msg, Object data, String time) {
        this.code = code;
        this.msg = msg;
        this.data = data;
        this.time = time;
    }

    public HttpResult(int code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
        this.time = TimeUtils.nowStr(TimeUtils.DEF_FMT_DATE_TIME);
    }
}
